"use static";
require("../css/index.css");
var $ = require("jquery");
var App = function(){
    var clickEvent = function(){
        $("#main>ul>li").on("click","a",function(){
            $("#wrap").show().find(".inner").css({
                "background":"url("+$(this).find("img").attr("src")+") no-repeat 50% 50%",
                "background-size":"auto 100%"
            }).hover(function(){$(this).attr({"title":$("#main>ul>li>span").html()})});
        });
    },
    buttonEvent = function(){
        $("#close").on("click",function(){
            $("#wrap").hide();
        });
    }
    return{
        init : function(){
            clickEvent();
            buttonEvent();
        }
    }
}();
$(function(){
    App.init();
})